<!--
*Author：DGZ
 **  contact:service@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/sys/lang/Sys_Language.jsx此处编写
 -->
<template>
  <view-grid ref="grid" :columns="columns" :detail="detail" :details="details" :editFormFields="editFormFields"
    :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
    :table="table" :extend="extend">
  </view-grid>
</template>
<script>
import extend from '@/extension/sys/lang/Sys_Language.jsx'
import { ref, defineComponent } from 'vue'
export default defineComponent({
  setup() {
    const table = ref({
      key: 'LanguageId',
      footer: 'Foots',
      cnName: '语言设置',
      name: 'lang/Sys_Language',
      newTabEdit: false,
      url: '/Sys_Language/',
      sortName: 'LanguageId',
    })
    const editFormFields = ref({
      ZHCN: '',
      ZHTW: '',
      English: '',
      French: '',
      Thai: '',
      Vietnamese: '',
      Spanish: '',
      Arabic: '',
    })
    const editFormOptions = ref([
      [
        { title: '简体中文', required: true, field: 'ZHCN', type: 'textarea' },
        { title: '繁体中文', field: 'ZHTW', type: 'textarea' },
        { title: '英语', field: 'English', type: 'textarea' },
        { title: '法语', field: 'French', type: 'textarea' },
      ],
      [
        { title: '泰语', field: 'Thai', type: 'textarea' },
        { title: '越南语', field: 'Vietnamese', type: 'textarea' },
        { title: '西班牙语', field: 'Spanish', type: 'textarea' },
        { title: '阿拉伯语', field: 'Arabic', type: 'textarea' },
      ],
    ])
    const searchFormFields = ref({
      ZHCN: '',
      ZHTW: '',
      English: '',
      French: '',
      Thai: '',
      Vietnamese: '',
      Spanish: '',
      Arabic: '',
    })
    const searchFormOptions = ref([
      [
        { title: '简体中文', field: 'ZHCN', type: 'like' },
        { title: '繁体中文', field: 'ZHTW', type: 'like' },
        { title: '英语', field: 'English', type: 'like' },
        { title: '法语', field: 'French', type: 'like' },
      ],
      [
        { title: '泰语', field: 'Thai', type: 'like' },
        { title: '越南语', field: 'Vietnamese', type: 'like' },
        { title: '西班牙语', field: 'Spanish', type: 'like' },
        { title: '阿拉伯语', field: 'Arabic', type: 'like' },
      ],
    ])
    const columns = ref([
      {
        field: 'LanguageId',
        title: 'LanguageId',
        type: 'int',
        width: 110,
        hidden: true,
        readonly: true,
        require: true,
        align: 'left',
      },
      { field: 'ZHCN', title: '简体中文', type: 'string', link: true, width: 130, require: true, align: 'left' },
      { field: 'ZHTW', title: '繁体中文', type: 'string', width: 130, hidden: true, align: 'left' },
      { field: 'English', title: '英语', type: 'string', width: 130, align: 'left' },
      { field: 'French', title: '法语', type: 'string', width: 130, hidden: true, align: 'left' },
      { field: 'Thai', title: '泰语', type: 'string', width: 130, align: 'left' },
      { field: 'Vietnamese', title: '越南语', type: 'string', width: 130, align: 'left' },
      { field: 'Spanish', title: '西班牙语', type: 'string', width: 130, hidden: true, align: 'left' },
      { field: 'Russian', title: '俄罗斯语', type: 'string', width: 130, hidden: true, align: 'left' },
      { field: 'Arabic', title: '阿拉伯语', type: 'string', width: 130, hidden: true, align: 'left' },
      { field: 'Module', title: '模块', type: 'string', width: 110, hidden: true, align: 'left' },
      { field: 'IsPackageContent', title: '语言包', type: 'int', width: 110, hidden: true, align: 'left' },
      { field: 'Remarks', title: '备注', type: 'string', width: 120, align: 'left' },
      { field: 'CreateId', title: '创建人编号', type: 'int', width: 110, hidden: true, align: 'left' },
      { field: 'Creator', title: '创建人', type: 'string', width: 100, align: 'left' },
      { field: 'CreateTime', title: '创建时间', type: 'datetime', width: 150, align: 'left' },
      { field: 'ModifyId', title: '修改人编号', type: 'int', width: 110, hidden: true, align: 'left' },
      { field: 'ModifyTime', title: 'ModifyTime', type: 'datetime', width: 110, hidden: true, align: 'left' },
      { field: 'Modifier', title: 'Modifier', type: 'string', width: 130, hidden: true, align: 'left' },
      { field: 'IsValid', title: 'IsValid', type: 'int', width: 120, hidden: true, require: true, align: 'left' },
    ])
    const detail = ref({ columns: [] })
    const details = ref([])
    return {
      table,
      extend,
      editFormFields,
      editFormOptions,
      searchFormFields,
      searchFormOptions,
      columns,
      detail,
      details,
    }
  },
})
</script>
